package com.jaay.pojo;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.data.annotation.Id;
import org.springframework.data.mongodb.core.mapping.Document;
import org.springframework.data.mongodb.core.mapping.Field;

import java.io.Serializable;
import java.util.Date;
import java.util.List;

@Data
@Document(collection = "order")
@AllArgsConstructor
@NoArgsConstructor
public class Order implements Serializable {

    @Id
    @Field(name = "_id")
    private Long id;
    /**
     * 订单编号
     */
    private String orderNo;
    /**
     * 订单日期
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date orderDate;
    /**
     * 商户名称
     */
    private String merchantName;
    /**
     * 商户编号
     */
    private String merchantNo;

    private List<Product> productList;




}
